﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace Hongsh.Pay.Client.Proxy.Http {
    // Token: 0x02000036 RID: 54
    public class HttpFileResult : HttpStreamResult {
        // Token: 0x0600017F RID: 383 RVA: 0x00003119 File Offset: 0x00001319
        public HttpFileResult(string file) : this(File.Open(file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) {
            //Class15.cwcZ3SWztHroi();
            //this..ctor(File.Open(file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
        }

        // Token: 0x06000180 RID: 384 RVA: 0x0000BD78 File Offset: 0x00009F78
        public HttpFileResult(FileStream file) : base(file) {
            //Class15.cwcZ3SWztHroi();
            //base..ctor(file);
            string[] source = file.Name.Split(new char[]
            {
                '.'
            });
            string text = source.LastOrDefault();
            if (text != null && MimeMap.TryGetValue(text, out text)) {
                ContentType = text;
            }
        }

        // Token: 0x06000181 RID: 385 RVA: 0x0000BDCC File Offset: 0x00009FCC
        static HttpFileResult() {
            //Class15.cwcZ3SWztHroi();
            Dictionary<string, string> dictionary = new Dictionary<string, string>();
            dictionary["evy"] = "application/envoy";
            dictionary["fif"] = "application/fractals";
            dictionary["spl"] = "application/futuresplash";
            dictionary["hta"] = "application/hta";
            dictionary["acx"] = "application/internet-property-stream";
            dictionary["hqx"] = "application/mac-binhex40";
            dictionary["doc"] = "application/msword";
            dictionary["dot"] = "application/msword";
            dictionary["oda"] = "application/oda";
            dictionary["axs"] = "application/olescript";
            dictionary["pdf"] = "application/pdf";
            dictionary["prf"] = "application/pics-rules";
            dictionary["p10"] = "application/pkcs10";
            dictionary["crl"] = "application/pkix-crl";
            dictionary["ai"] = "application/postscript";
            dictionary["eps"] = "application/postscript";
            dictionary["ps"] = "application/postscript";
            dictionary["rtf"] = "application/rtf";
            dictionary["setpay"] = "application/set-payment-initiation";
            dictionary["setreg"] = "application/set-registration-initiation";
            dictionary["xla"] = "application/vnd.ms-excel";
            dictionary["xlc"] = "application/vnd.ms-excel";
            dictionary["xlm"] = "application/vnd.ms-excel";
            dictionary["xls"] = "application/vnd.ms-excel";
            dictionary["xlt"] = "application/vnd.ms-excel";
            dictionary["xlw"] = "application/vnd.ms-excel";
            dictionary["msg"] = "application/vnd.ms-outlook";
            dictionary["sst"] = "application/vnd.ms-pkicertstore";
            dictionary["cat"] = "application/vnd.ms-pkiseccat";
            dictionary["stl"] = "application/vnd.ms-pkistl";
            dictionary["pot"] = "application/vnd.ms-powerpoint";
            dictionary["pps"] = "application/vnd.ms-powerpoint";
            dictionary["ppt"] = "application/vnd.ms-powerpoint";
            dictionary["mpp"] = "application/vnd.ms-project";
            dictionary["wcm"] = "application/vnd.ms-works";
            dictionary["wdb"] = "application/vnd.ms-works";
            dictionary["wks"] = "application/vnd.ms-works";
            dictionary["wps"] = "application/vnd.ms-works";
            dictionary["hlp"] = "application/winhlp";
            dictionary["bcpio"] = "application/x-bcpio";
            dictionary["cdf"] = "application/x-cdf";
            dictionary["z"] = "application/x-compress";
            dictionary["tgz"] = "application/x-compressed";
            dictionary["cpio"] = "application/x-cpio";
            dictionary["csh"] = "application/x-csh";
            dictionary["dcr"] = "application/x-director";
            dictionary["dir"] = "application/x-director";
            dictionary["dxr"] = "application/x-director";
            dictionary["dvi"] = "application/x-dvi";
            dictionary["gtar"] = "application/x-gtar";
            dictionary["gz"] = "application/x-gzip";
            dictionary["hdf"] = "application/x-hdf";
            dictionary["ins"] = "application/x-internet-signup";
            dictionary["isp"] = "application/x-internet-signup";
            dictionary["iii"] = "application/x-iphone";
            dictionary["js"] = "application/x-javascript";
            dictionary["latex"] = "application/x-latex";
            dictionary["mdb"] = "application/x-msaccess";
            dictionary["crd"] = "application/x-mscardfile";
            dictionary["clp"] = "application/x-msclip";
            dictionary["dll"] = "application/x-msdownload";
            dictionary["m13"] = "application/x-msmediaview";
            dictionary["m14"] = "application/x-msmediaview";
            dictionary["mvb"] = "application/x-msmediaview";
            dictionary["wmf"] = "application/x-msmetafile";
            dictionary["mny"] = "application/x-msmoney";
            dictionary["pub"] = "application/x-mspublisher";
            dictionary["scd"] = "application/x-msschedule";
            dictionary["trm"] = "application/x-msterminal";
            dictionary["wri"] = "application/x-mswrite";
            dictionary["cdf"] = "application/x-netcdf";
            dictionary["nc"] = "application/x-netcdf";
            dictionary["pma"] = "application/x-perfmon";
            dictionary["pmc"] = "application/x-perfmon";
            dictionary["pml"] = "application/x-perfmon";
            dictionary["pmr"] = "application/x-perfmon";
            dictionary["pmw"] = "application/x-perfmon";
            dictionary["p12"] = "application/x-pkcs12";
            dictionary["pfx"] = "application/x-pkcs12";
            dictionary["p7b"] = "application/x-pkcs7-certificates";
            dictionary["spc"] = "application/x-pkcs7-certificates";
            dictionary["p7r"] = "application/x-pkcs7-certreqresp";
            dictionary["p7c"] = "application/x-pkcs7-mime";
            dictionary["p7m"] = "application/x-pkcs7-mime";
            dictionary["p7s"] = "application/x-pkcs7-signature";
            dictionary["sh"] = "application/x-sh";
            dictionary["shar"] = "application/x-shar";
            dictionary["swf"] = "application/x-shockwave-flash";
            dictionary["sit"] = "application/x-stuffit";
            dictionary["sv4cpio"] = "application/x-sv4cpio";
            dictionary["sv4crc"] = "application/x-sv4crc";
            dictionary["tar"] = "application/x-tar";
            dictionary["tcl"] = "application/x-tcl";
            dictionary["tex"] = "application/x-tex";
            dictionary["texi"] = "application/x-texinfo";
            dictionary["texinfo"] = "application/x-texinfo";
            dictionary["roff"] = "application/x-troff";
            dictionary["t"] = "application/x-troff";
            dictionary["tr"] = "application/x-troff";
            dictionary["man"] = "application/x-troff-man";
            dictionary["me"] = "application/x-troff-me";
            dictionary["ms"] = "application/x-troff-ms";
            dictionary["ustar"] = "application/x-ustar";
            dictionary["src"] = "application/x-wais-source";
            dictionary["cer"] = "application/x-x509-ca-cert";
            dictionary["crt"] = "application/x-x509-ca-cert";
            dictionary["der"] = "application/x-x509-ca-cert";
            dictionary["pko"] = "application/ynd.ms-pkipko";
            dictionary["zip"] = "application/zip";
            dictionary["au"] = "audio/basic";
            dictionary["snd"] = "audio/basic";
            dictionary["mid"] = "audio/mid";
            dictionary["rmi"] = "audio/mid";
            dictionary["mp3"] = "audio/mpeg";
            dictionary["aif"] = "audio/x-aiff";
            dictionary["aifc"] = "audio/x-aiff";
            dictionary["aiff"] = "audio/x-aiff";
            dictionary["m3u"] = "audio/x-mpegurl";
            dictionary["ra"] = "audio/x-pn-realaudio";
            dictionary["ram"] = "audio/x-pn-realaudio";
            dictionary["wav"] = "audio/x-wav";
            dictionary["bmp"] = "image/bmp";
            dictionary["cod"] = "image/cis-cod";
            dictionary["gif"] = "image/gif";
            dictionary["ief"] = "image/ief";
            dictionary["jpe"] = "image/jpeg";
            dictionary["jpeg"] = "image/jpeg";
            dictionary["jpg"] = "image/jpeg";
            dictionary["jfif"] = "image/pipeg";
            dictionary["svg"] = "image/svg+xml";
            dictionary["tif"] = "image/tiff";
            dictionary["tiff"] = "image/tiff";
            dictionary["ras"] = "image/x-cmu-raster";
            dictionary["cmx"] = "image/x-cmx";
            dictionary["ico"] = "image/x-icon";
            dictionary["pnm"] = "image/x-portable-anymap";
            dictionary["pbm"] = "image/x-portable-bitmap";
            dictionary["pgm"] = "image/x-portable-graymap";
            dictionary["ppm"] = "image/x-portable-pixmap";
            dictionary["rgb"] = "image/x-rgb";
            dictionary["xbm"] = "image/x-xbitmap";
            dictionary["xpm"] = "image/x-xpixmap";
            dictionary["xwd"] = "image/x-xwindowdump";
            dictionary["mht"] = "message/rfc822";
            dictionary["mhtml"] = "message/rfc822";
            dictionary["nws"] = "message/rfc822";
            dictionary["css"] = "text/css";
            dictionary["323"] = "text/h323";
            dictionary["htm"] = "text/html";
            dictionary["html"] = "text/html";
            dictionary["stm"] = "text/html";
            dictionary["uls"] = "text/iuls";
            dictionary["bas"] = "text/plain";
            dictionary["c"] = "text/plain";
            dictionary["h"] = "text/plain";
            dictionary["txt"] = "text/plain";
            dictionary["rtx"] = "text/richtext";
            dictionary["sct"] = "text/scriptlet";
            dictionary["tsv"] = "text/tab-separated-values";
            dictionary["htt"] = "text/webviewhtml";
            dictionary["htc"] = "text/x-component";
            dictionary["etx"] = "text/x-setext";
            dictionary["vcf"] = "text/x-vcard";
            dictionary["mp2"] = "video/mpeg";
            dictionary["mpa"] = "video/mpeg";
            dictionary["mpe"] = "video/mpeg";
            dictionary["mpeg"] = "video/mpeg";
            dictionary["mpg"] = "video/mpeg";
            dictionary["mpv2"] = "video/mpeg";
            dictionary["mov"] = "video/quicktime";
            dictionary["qt"] = "video/quicktime";
            dictionary["lsf"] = "video/x-la-asf";
            dictionary["lsx"] = "video/x-la-asf";
            dictionary["asf"] = "video/x-ms-asf";
            dictionary["asr"] = "video/x-ms-asf";
            dictionary["asx"] = "video/x-ms-asf";
            dictionary["avi"] = "video/x-msvideo";
            dictionary["movie"] = "video/x-sgi-movie";
            dictionary["flr"] = "x-world/x-vrml";
            dictionary["vrml"] = "x-world/x-vrml";
            dictionary["wrl"] = "x-world/x-vrml";
            dictionary["wrz"] = "x-world/x-vrml";
            dictionary["xaf"] = "x-world/x-vrml";
            dictionary["xof"] = "x-world/x-vrml";
            MimeMap = dictionary;
        }

        // Token: 0x040000A8 RID: 168
        public static readonly Dictionary<string, string> MimeMap;
    }
}
